#!/usr/bin/env python3

import os, sys, math

def main():
    a = 1.0
    b = 1.0
    n = 1
    while n <= int(sys.argv[1]):
        a *= (2 * n - 1) / (2 * n)
        b = 1 / math.sqrt(3 * n + 1)
        print("n={3}: a={0}, b={1}, diff={2}".format(a, b, b - a, n))
        n += 1

if __name__ == "__main__":
    main()
